package com.zsc.wxm.ysh.anjo.service.base.enums.resources;

import lombok.Getter;

/**
 * 描述： 看房时间枚举  看房时间，1-上午，2-中午，3-下午，4-晚上，5-全天
 *
 * @author playmaker
 * @since 2021/2/12 22:09
 */
@Getter
public enum  ViewingTimeType {
    /**
     * 枚举
     */
    MORNING(1, "上午"),
    NOON(2, "中午"),
    AFTERNOON(3, "下午"),
    NIGHT(4, "晚上"),
    ALL(5, "全天"),
    OTHER(6,"需提前预约")
    ;


    /**
     * 值
     */
    private int value;

    /**
     * 描述
     */
    private String desc;

    ViewingTimeType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getEnumDesc(int value) {
        for (ViewingTimeType viewingTimeType : ViewingTimeType.values()) {
            if (viewingTimeType.getValue() == value) {
                return viewingTimeType.getDesc();
            }
        }
        return "";
    }
}
